import { shallowReactive, type ShallowReactive } from "vue";
import { MapContext } from "./mapContext";
import { RefMapScene } from "./refMapScene";
import { RefMapLayer } from "./refMapLayer";

/**
 * 响应式地图上下文
 */
export class RefMapContext extends MapContext<RefMapScene, RefMapLayer> {
    /** 场景实例 */
    protected scene?: RefMapScene = undefined;
    /** 图层集合 */
    protected layers: ShallowReactive<Record<string, RefMapLayer>> = shallowReactive({});
    /** zIndex 排序 */
    protected zIndexSort: ShallowReactive<RefMapLayer[]> = shallowReactive([]);
}
